// Surface
// (c) jimon game studio

#ifndef JEH_ISURFACE
#define JEH_ISURFACE

#include "jeUnknown.h"
#include "jeStl.h"
#include "jeMaterialResource.h"
#include "jeRenderOperation.h"

namespace je
{
	namespace scene
	{
		//! Surface
		class ISurface:public je::jeUnknown
		{
		public:
			//! Destructor
			virtual ~ISurface()
			{
			}

			//! Set Material Resource
			virtual void SetMaterialResource(media::jeMaterialResource * MaterialResource,u1 UseUniqueMaterial = false,u1 UseUniqueTextures = true,u1 UseUniqueShader = true) = 0;

			//! Get Material Resource
			virtual media::jeMaterialResource * GetMaterialResource() = 0;

			//! Get Shared Material Resource
			virtual media::jeSharedMaterial * GetSharedMaterialResource() = 0;

			//! Get Render
			virtual video::IRender * GetRender() = 0;

			//! Get Render Operation
			virtual video::jeRenderOperation * GetRenderOperation() = 0;

			//! Get Render Operation Type
			virtual video::RenderOperationType GetRenderOperationType() = 0;

			//! Get Material
			virtual video::jeMaterial * GetMaterial() = 0;

			//! On Render
			virtual void OnRender(const jeMatrix4f & AbsoluteModelMatrix) = 0;
		};

		//! Create Surface
		JE_ENGINE_FUNCTION_API ISurface * JE_ENGINE_FUNCTION_CALL CreateSurface(video::IRender * Render,video::RenderOperationType Type,video::jeRenderOperation * Operation);
	}
}

#endif
